1. Field of the Invention
The present invention is directed to the compensation of the electronic paint that an artist can apply to a computer based model and, more particularly, to the compensation of a paint stamp when it exceeds or crosses the boundary of a texture triangle onto which it is applied.
2. Description of the Related Art
Computer generated three dimensional (3D) objects are typically comprised of polygons, typically triangles, of sufficiently small size that the surface of the model appears smooth. Surface detail (color, topology, reflectance, etc.) is applied to these smooth computer generated three-dimensional images by applying painted 2D images, known as textures, to the 3D models in a process called texture mapping. Much of the realism of the models is affected by these textures, and great care is therefore taken to produce the desired effects when painting the textures.
Digital paint is typically applied in brush strokes, with each stroke using a particular paint brush specified by the user. Various attributes of the brush must be specified before the brush can be used to produce a stroke. These attributes include, e.g., the color of paint; the radius, aspect ratio, and rotational angle of the brush; a detailed map specifying the amount of paint to be applied at each point in the brush. The collection of these attributes are called a brush stamp. Once the attributes are set, a digital image of the stamp is created: this is called the stamp image, or a stamp source image. Stamps can then be placed on a target image by copying the stamp image to various locations on the target. Paint brush strokes are typically applied by placing a sequence of consecutive stamps along the trajectory of a path as is indicated by the user with a stylus or mouse pointer. The spacing between the stamps on the path determine the appearance of the stroke. Stamp spacing is typically another attribute specified by the user.
Paint may be applied to 3D models by either painting directly onto the flat texture, or by painting on the model. Although both are useful, only the latter method provides direct visual feedback as to the final appearance of the painted model.
Two methods are conventionally provided for painting in 3D: projective and surface. In projective painting, the paint is applied to a flat surface which is shaded and masked by the model in such a way that the paint appears to be applied directly to the surface. A separate projection step is then necessary to move the paint from this paint plane onto the various textures of the object.
The second 3D painting method is known as painting on the surface. In this approach, paint is applied directly onto the texture assigned to each surface. In particular, brush stamps are applied to the texture in a manner which is consistent with the conventional triangulated surface tessellation of computer based models. Stamps are centered at the world space position designated by the mouse or stylus pointer. That is, given a world space point in the interior of a surface triangle, the corresponding texture space point is found in the interior of the texture triangle assigned to it. The point in texture space is then used as the center of the stamp where it is to be placed. This gives rise to the problem illustrated in FIG. 1. Paint stamps a, b and c are identical in texture-space but quite dissimilar in world-space. When a stamp exceeds the boundary of the texture polygon on which it is applied, as occurs in triangle 12, and the neighboring texture polygon has been assigned a different texture, the stamp will appear chopped off (disconnected) in world space after the texture triangle has been mapped to the corresponding world space triangle, as it appears in world space triangle 14.
What is needed is a method of applying stamps to the texture polygons that eliminates the disconnection.
It is an object of the present invention to apply paint to world space objects in such a way that disconnected or cutoff stamps do not occur.
The above objects can be attained by a system that applies stamps to neighboring texture polygons in such a way that each texture polygon affected by a stamp that is too big for the target polygon receives a proportional portion of a stamp.
These together with other objects and advantages, which will be subsequently apparent, reside in the details of construction and operation as more fully hereinafter described and claimed, reference being had to the accompanying drawings forming a part hereof, wherein like numerals refer to like parts throughout.